package com.zimin.cloud.user.service.impl;

import com.zimin.cloud.mine.pojo.user.view.UserRoleVO;
import com.zimin.cloud.user.pojo.entity.UserRole;
import com.zimin.cloud.user.mapper.UserRoleMapper;
import com.zimin.cloud.user.service.IUserRoleService;
import com.zimin.mapper.injector.InjectServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户角色关联表 服务实现类
 * </p>
 *
 * @author zimin
 * @since 2022-06-14 15:53
 */
@Service("userRoleService")
public class UserRoleServiceImpl extends InjectServiceImpl<UserRoleMapper, UserRole> implements IUserRoleService {

    @Autowired
    private UserRoleMapper userRoleMapper;

    @Override
    public List<UserRoleVO> getUserRoleByUserId(String userId) {
        return userRoleMapper.getUseRoleByUserId(userId);
    }
}
